﻿#ifndef REGISTERCONTROLBASE_H
#define REGISTERCONTROLBASE_H
#include "GY_ControlLibrary_global.h"
#include <QVariant>
#include <QWidget>
/**
 * @brief RegisterControlBase 自定义Item控件基类
 */
class GY_CONTROLLIBRARY_EXPORT RegisterControlBase : public QWidget
{
    Q_OBJECT
signals:
    bool controlDataUpdate(const QVariant &rowID, qint32 columenIndex, const QVariant &data);

public:
    explicit RegisterControlBase(QWidget *parent = nullptr);
    /**
     * @brief setData 设置数据
     * @param data  数据
     */
    virtual void setData(const QVariant &data)=0;
    /**
     * @brief setPosition 设置所在容器的id和索引
     * @param rowID 行ID
     * @param columenIndex 列索引
     */
    void setPosition(const QVariant &rowID,const qint32 &columenIndex);

protected:
    //!列索引
    qint32 m_ColumenIndex;
    //!行ID
    QVariant m_RowId;
};

#endif // REGISTERCONTROLBASE_H
